﻿@model _1_31_2015_SLMSite.Models.AppointmentViewModel
@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-4">
            <h2>Update/Create User</h2>
            @using (Html.BeginForm())
            {

                <div class="form-group">
                    @Html.LabelFor(a => a.Reason)
                    @Html.TextBoxFor(a => a.Reason, new { @class = "form-control" })
                </div>
                
                <div class="form-group">
                    @Html.LabelFor(a => a.ApptType, "ApptType", htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.DropDownListFor(a => a.ApptType, new SelectList(Model.ApptTypes, "ApptTypeId", "ApptTypeDesc"), "-Select Appointment Type-", new { @class = "form-control" })
                        @Html.ValidationMessageFor(a => a.ApptType, "", new { @class = "text-danger" })
                    </div>
                </div>
    <p>try this one</p>
                <div class="form-group datepicker" id="datep1">
                    @Html.LabelFor(a => a.Date)
                    @Html.TextBoxFor(a => a.Date, new { @class = "form-control datepicker" })
                </div>

    <div class="form-group datepicker" id="datep1">
        @Html.LabelFor(a => a.DateString)
        @Html.TextBoxFor(a => a.DateString, new { @class = "form-control" })
        @Html.TextBoxFor(a => a.Date, new { @class = "form-control datepicker", placeholder = "Enter Drop-off date here..." })
    </div>
    <div class="input-append date" id="date3">
        <input type="text" value="12-02-2012">
        <span class="add-on"><i class="icon-th"></i></span>
    </div>

                <div class="form-group">
                    @Html.LabelFor(a => a.ApptTimeFrame, "ApptTimeFrame", htmlAttributes: new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.DropDownListFor(a => a.ApptTimeFrame, new SelectList(Model.ApptTimeFrames, "ApptTimeFrameId", "ApptTimeFrameDesc"), "-Select Appointment Type-", new { @class = "form-control" })
                        @Html.ValidationMessageFor(a => a.ApptTimeFrame, "", new { @class = "text-danger" })
                    </div>
                </div>
    <div class="input-append date" id="datepicker" data-date="dateValue: @Model.Date" data-date-format="dd-mm-yyyy">
        <input class="span2" size="16" type="text" data-bind="value: @Model.Date" readonly="readonly" />
        <span class="add-on"><i class="icon-calendar"></i></span>
    </div>
                <input type="hidden" value="@Model.DateString" name="apptDate" />
                <input type="submit" class="btn btn-info" value="Request Appointment" />
            }

        </div>

    </div>
</div>

<script>
    $(function () {
        $('#date').datepicker();
        $('#datep1').datepicker();
        $('#date3').datepicker();
        $('#datepicker').datepicker();
    });
</script>